﻿-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
CREATE PROCEDURE [dbo].[UpdateProfileInfo]
	@ProfileID bigint,
	@CurrentCity varchar(50),
	@CurrentCityPrivacy smallint,
	@HomeCity varchar(50),
	@HomeCityPrivacy smallint,
	@Gender varchar(8),
	@Birthday Date,
	@BirthdayPrivacy smallint,
	@InterestedIn varchar(20),
	@InterestedInPrivacy smallint,
	@Languages varchar(100),
	@LanguagesPrivacy smallint,
	@AboutMe varchar(200),
	@AboutMePrivacy smallint
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	  SET NOCOUNT ON;

	  UPDATE ProfileInfo SET
	  CurrentCity=@CurrentCity,
	  CurrentCityPrivacy = @CurrentCityPrivacy,
	  HomeCity = @HomeCity,
	  HomeCityPrivacy = @HomeCityPrivacy,
	  Gender = @Gender,
	  BirthDay = @Birthday,
	  BirthdayPrivacy = @BirthdayPrivacy,
	  InterestedIn = @InterestedIn,
	  InterestedInPrivacy = @InterestedInPrivacy,
	  Languages = @Languages,
	  LanguagesPrivacy = @LanguagesPrivacy,
	  AboutMe=@AboutMe,
	  AboutMePrivacy=@AboutMePrivacy,
	  ModifiedDate = GETDATE()
	  WHERE ProfileID=@ProfileID
END


